<template>
  <el-menu
    default-active="2"
    class="el-menu-vertical-demo"
    :collapse="false"
    :router="true"
  >
    <el-menu-item index="/container">
      <el-icon><location /></el-icon>
      <template #title>容器管理</template>
    </el-menu-item>
    <el-menu-item index="/image">
      <el-icon><icon-menu /></el-icon>
      <template #title>镜像管理</template>
    </el-menu-item>
    <el-menu-item index="/app">
      <el-icon><document /></el-icon>
      <template #title>应用上线</template>
    </el-menu-item>
    <el-menu-item index="/k8s">
      <el-icon><setting /></el-icon>
      <template #title>K8s管理</template>
    </el-menu-item>
    <el-menu-item index="/pods">
      <el-icon><setting /></el-icon>
      <template #title>pod管理</template>
    </el-menu-item>
  </el-menu>
</template>

<script>
import { defineComponent, ref } from "vue";
import {
  Location,
  Document,
  Menu as IconMenu,
  Setting,
} from "@element-plus/icons-vue";

export default defineComponent({
  name: "Menu",
  components: {
    Location,
    Document,
    Setting,
    IconMenu,
  },
  setup() {
    const isCollapse = ref(true);
    const handleOpen = (key, keyPath) => {
      console.log(key, keyPath);
    };
    const handleClose = (key, keyPath) => {
      console.log(key, keyPath);
    };
    return {
  
      isCollapse,
      handleOpen,
      handleClose,
    };
  },
});
</script>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 241px;
  min-height: 400px;
}
</style>